package com.example.order.controller;

import com.example.api.order.OrderServiceApi;
import com.example.api.order.ProductOrder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Objects;

/**
 * @author 86188
 */
@RestController
public class OrderController implements OrderServiceApi {

    @Override
    public ProductOrder createOrder(ProductOrder order) {
        if (Objects.isNull(order)) {
            throw new RuntimeException("业务异常");
        }
        return order;
    }
}
